<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Loading</title>
    <style>
        body{
            display: flex;
            align-items: center;
            justify-content: center;
            height: 99vh;
            margin: 0;
        }
        .container {
            display: flex;
            justify-content: center;
            justify-items: center;
            background-color: #121212;
            font-family: "Inter", sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 400px;
            height: 400px;
            border-radius: 1rem;
        }

        .vert-line {
            width: 10px;
            height: 100px;
            background-color: lightblue;
            border-radius: 1rem;
            margin: 1rem;
            animation: flash infinite 1s backwards;
        }

        .vert-line:nth-child(2) {
            animation-delay: 0.1s;
        }
        .vert-line:nth-child(3) {
            animation-delay: 0.2s;
        }

          .vert-line:nth-child(4) {
            animation-delay: 0.3s;
        }
        .vert-line:nth-child(5) {
            animation-delay: 0.4s;
        }

        @keyframes flash {
            0% {
                height: 100px;
            }

             10% {
                height: 90px;
            }

             20% {
                height: 80px;
            }

            20% {
                height: 70px;
                background-color: red;
            }

            30% {
                height: 60px;
            }

            40% {
                height: 50px;
                background-color: green;
            }

            50% {
                height: 40px;
            }

            60% {
                height: 30px;
            }

            70% {
                height: 20px;
            }

            80% {
                height: 10px;
            }

            90% {
                height: 10px;
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="vert-line"></div>
        <div class="vert-line"></div>
        <div class="vert-line"></div>
        <div class="vert-line"></div>
        <div class="vert-line"></div>
    </div>
</body>
<script type="text/javascript">
  const eventSource = new EventSource('/sse');
  eventSource.onmessage = ({ data }) => {
    const message = document.createElement('li');
    message.innerText = 'New message: ' + data;
    document.body.appendChild(message);
  }
</script>
</html>